@extends('layout/layout')

@section('content')

	<form action="{{ action('UsersController@handleEdit') }}" method="post" role="form">
		<input type="hidden" class="form-control" name="id" value="{{ $user->id }}"/>
		
		<h3>Alteração de Usuario</h3>
		<hr />
	
		<div class="form-group">
			<label for="title">Nome</label> 
			<input type="text" class="form-control" name="name" value="{{ $user->name }}"/>
		</div>
		
		<div class="form-group">
			<label for="title">Email</label> 
			<input type="text" class="form-control" name="email" value="{{ $user->email }}"/>
		</div>
		
		<div class="form-group">
			<label for="title">Password</label> 
			<input type="password" class="form-control" name="password" value="{{ $user->password }}"/>
		</div>
		
		<div class="form-group">
			<label for="title">Tipo</label>
			<select class="form-control" name="type">
			  <option value="admin" @if ($user->type == 'admin') selected="selected" @endif>Admin</option>
			  <option value="support" @if ($user->type == 'support') selected="selected" @endif>Suporte</option>
			</select>
		</div>	
		<input type="submit" value="Enviar" class="btn btn-primary" />
	</form>

@stop